﻿///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Aug 25 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "wxRecordMemory_GUI.h"

///////////////////////////////////////////////////////////////////////////

MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
}

MainFrame::~MainFrame()
{
}

MainPanel::MainPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	this->SetBackgroundColour( wxColour( 176, 192, 236 ) );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staInfo = new wxStaticText( this, wxID_ANY, wxT("运行信息"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staInfo->Wrap( -1 );
	m_staInfo->SetFont( wxFont( 16, 70, 90, 92, false, wxT("楷体_GB2312") ) );
	m_staInfo->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVECAPTION ) );
	
	mainSizer->Add( m_staInfo, 0, wxEXPAND|wxALL, 5 );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	m_butSelProcess = new wxButton( this, wxID_ANY, wxT("选择进程"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer5->Add( m_butSelProcess, 0, wxALL, 5 );
	
	m_butRecord = new wxButton( this, wxID_ANY, wxT("开始记录"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer5->Add( m_butRecord, 0, wxALL, 5 );
	
	m_butClear = new wxButton( this, wxID_ANY, wxT("清空"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer5->Add( m_butClear, 0, wxALL, 5 );
	
	m_butAbout = new wxButton( this, wxID_ANY, wxT("关于"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer5->Add( m_butAbout, 0, wxALL, 5 );
	
	m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("刷新间隔"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText6->Wrap( -1 );
	bSizer5->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString m_choReInvChoices[] = { wxT("1"), wxT("2"), wxT("3"), wxT("4"), wxT("5") };
	int m_choReInvNChoices = sizeof( m_choReInvChoices ) / sizeof( wxString );
	m_choReInv = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choReInvNChoices, m_choReInvChoices, 0 );
	m_choReInv->SetSelection( 0 );
	bSizer5->Add( m_choReInv, 1, wxALL|wxEXPAND, 5 );
	
	m_staticText7 = new wxStaticText( this, wxID_ANY, wxT("记录间隔"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText7->Wrap( -1 );
	bSizer5->Add( m_staticText7, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxString m_choLogInvChoices[] = { wxT("5"), wxT("10"), wxT("15"), wxT("20"), wxT("25") };
	int m_choLogInvNChoices = sizeof( m_choLogInvChoices ) / sizeof( wxString );
	m_choLogInv = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choLogInvNChoices, m_choLogInvChoices, 0 );
	m_choLogInv->SetSelection( 0 );
	bSizer5->Add( m_choLogInv, 1, wxALL|wxEXPAND, 5 );
	
	mainSizer->Add( bSizer5, 0, wxEXPAND, 5 );
	
	m_listRecord = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_ALIGN_TOP|wxLC_HRULES|wxLC_REPORT|wxLC_VRULES );
	m_listRecord->SetFont( wxFont( 11, 70, 90, 90, false, wxEmptyString ) );
	
	mainSizer->Add( m_listRecord, 1, wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("日志文件路径"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	bSizer10->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_textLog = new wxTextCtrl( this, wxID_ANY, wxT("record.txt"), wxDefaultPosition, wxDefaultSize, 0 );
	m_textLog->SetToolTip( wxT("日志文件存储的全路径") );
	
	bSizer10->Add( m_textLog, 1, wxALL|wxEXPAND, 5 );
	
	mainSizer->Add( bSizer10, 0, wxEXPAND, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
	
	// Connect Events
	m_butSelProcess->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnSelProcess ), NULL, this );
	m_butRecord->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnRecord ), NULL, this );
	m_butClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnClear ), NULL, this );
	m_butAbout->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnAbout ), NULL, this );
}

MainPanel::~MainPanel()
{
	// Disconnect Events
	m_butSelProcess->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnSelProcess ), NULL, this );
	m_butRecord->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnRecord ), NULL, this );
	m_butClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnClear ), NULL, this );
	m_butAbout->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainPanel::OnAbout ), NULL, this );
}

wxDlgProcess::wxDlgProcess( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer7;
	bSizer7 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer8;
	bSizer8 = new wxBoxSizer( wxHORIZONTAL );
	
	m_butRefresh = new wxButton( this, wxID_Refresh, wxT("刷新"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer8->Add( m_butRefresh, 0, wxALL, 5 );
	
	m_staticText8 = new wxStaticText( this, wxID_ANY, wxT("鼠标右击选中相应进程"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText8->Wrap( -1 );
	m_staticText8->SetFont( wxFont( 14, 70, 90, 92, false, wxT("楷体_GB2312") ) );
	m_staticText8->SetForegroundColour( wxColour( 7, 152, 69 ) );
	
	bSizer8->Add( m_staticText8, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_butCancel = new wxButton( this, wxID_CANCEL, wxT("取消"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer8->Add( m_butCancel, 0, wxALL, 5 );
	
	bSizer7->Add( bSizer8, 0, wxEXPAND, 5 );
	
	m_listProcess = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ALIGN_LEFT|wxLC_ALIGN_TOP|wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
	m_listProcess->SetFont( wxFont( 16, 70, 90, 92, false, wxT("楷体_GB2312") ) );
	
	bSizer7->Add( m_listProcess, 1, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bSizer7 );
	this->Layout();
	
	// Connect Events
	m_butRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxDlgProcess::OnButClick ), NULL, this );
	m_butCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxDlgProcess::OnButClick ), NULL, this );
	m_listProcess->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( wxDlgProcess::OnColClick ), NULL, this );
	m_listProcess->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( wxDlgProcess::OnRightClick ), NULL, this );
}

wxDlgProcess::~wxDlgProcess()
{
	// Disconnect Events
	m_butRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxDlgProcess::OnButClick ), NULL, this );
	m_butCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxDlgProcess::OnButClick ), NULL, this );
	m_listProcess->Disconnect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( wxDlgProcess::OnColClick ), NULL, this );
	m_listProcess->Disconnect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( wxDlgProcess::OnRightClick ), NULL, this );
}

AboutDlg::AboutDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* mainSizer;
	mainSizer = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* infoSizer;
	infoSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
	
	wxBoxSizer* bSizer10;
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_icon = new wxStaticBitmap( this, ID_ABOUT_ICON, wxICON( amain ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer10->Add( m_icon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxBoxSizer* textSizer;
	textSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticAppName = new wxStaticText( this, ID_ABOUT_APPNAME, wxT("wxRecordMemory"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticAppName->Wrap( -1 );
	m_staticAppName->SetFont( wxFont( 10, 70, 90, 92, false, wxT("Arial") ) );
	
	textSizer->Add( m_staticAppName, 0, wxEXPAND|wxALL, 5 );
	
	m_staticVersion = new wxStaticText( this, ID_ABOUT_VERSION, wxT("Version:  1.0.0.20091231\nauthor:   lava_sdb"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticVersion->Wrap( -1 );
	textSizer->Add( m_staticVersion, 1, wxEXPAND|wxALL, 5 );
	
	bSizer10->Add( textSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	infoSizer->Add( bSizer10, 1, 0, 5 );
	
	m_staticline1 = new wxStaticLine( this, ID_DEFAULT, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	infoSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
	
	m_staticCopyright = new wxStaticText( this, ID_ABOUT_COPYRIGHT, wxT("Copyright © 2009-2010"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticCopyright->Wrap( -1 );
	infoSizer->Add( m_staticCopyright, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	mainSizer->Add( infoSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
	
	m_aboutDialogButtonSizer = new wxStdDialogButtonSizer();
	m_aboutDialogButtonSizerOK = new wxButton( this, wxID_OK );
	m_aboutDialogButtonSizer->AddButton( m_aboutDialogButtonSizerOK );
	m_aboutDialogButtonSizer->Realize();
	mainSizer->Add( m_aboutDialogButtonSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	this->SetSizer( mainSizer );
	this->Layout();
}

AboutDlg::~AboutDlg()
{
}
